package com.shadow.study.h2.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shadow.study.h2.entity.H2UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface H2UserMapper extends BaseMapper<H2UserEntity> {

    // 大小写敏感
    @Select("SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'STUDY_H2_USER'")
    int checkTableExists();

    void createTable();
}
